﻿using System.Web.Mvc;
using Dexter.Logger.Contracts;
using Dexter.Services;
using Dexter.Web.Mvc.Filters;
using Dexter.Web.Utils;

namespace Dexter.Web.Mvc.Controllers.Plugin
{
	[DexterCallFilter(false)]
	public class PluginBackofficeControllerBase : BackOfficeControllerBase
	{
		protected IPluginService PluginService { get; private set; }


		public PluginBackofficeControllerBase(IConfigurationService configurationService, IWebUtils webUtils, ILogger logger, IUrlBuilder urlBuilder, IContactService contactService,IPluginService pluginService) : base(configurationService, webUtils, logger, urlBuilder, contactService)
		{
			this.PluginService = pluginService;
		}

		protected ActionResult RedirectToPluginList()
		{
			return RedirectToAction("Index", "PluginController", new { area = "backoffice" });
		}

		protected new System.Web.Mvc.ViewResult View()
		{
			return View(null, "~/Areas/Admin/Views/Shared/_BackOffice.cshtml", null);
		}

		protected new System.Web.Mvc.ViewResult View(object model)
		{
			return View(null, "~/Areas/Admin/Views/Shared/_BackOffice.cshtml", model);
		}

		protected new System.Web.Mvc.ViewResult View(string viewname, object model)
		{
			return View(viewname, "~/Areas/Admin/Views/Shared/_BackOffice.cshtml", model);
		}

		protected override System.Web.Mvc.ViewResult View(string viewName, string masterName, object model)
		{
			return base.View(viewName, masterName, model);
		}
	}
}
